//
//  NSInterestsItemCell.m
//  PassionPulse
//
//  Created by kyo on 2024/1/27.
//

#import "NSInterestsItemCell.h"

@interface NSInterestsItemCell()
@property(nonatomic,strong) NSMutableArray *backColorArr;
@property(nonatomic,strong) NSMutableArray *titleColorArr;
@end

@implementation NSInterestsItemCell
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

#pragma mark - Public Metohd

#pragma mark - Action

#pragma mark - UI
- (void)setupUI {
    self.contentView.backgroundColor = UIColor.clearColor;
    
    [self.contentView addSubview:self.titleBtn];
    [self.titleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

#pragma mark - Setter && Getter
- (UIButton *)titleBtn {
    if (!_titleBtn) {
        _titleBtn = [UIButton new];
        int index = arc4random() % 5;
        [_titleBtn setBackgroundColor:HEXS(self.backColorArr[index])];
        [_titleBtn setTitleColor:HEXS(self.titleColorArr[index]) forState:0];
        _titleBtn.layer.cornerRadius = MBHeightScale(15.5);
        _titleBtn.titleLabel.font = MBHelFontSizeScale(15);
    }
    return _titleBtn;
}

- (NSMutableArray *)backColorArr {
    if (!_backColorArr) {
        _backColorArr = [NSMutableArray arrayWithArray:@[@"EADBFF",@"E3F0F9",@"F7E2E9",@"E2E6FF",@"F7E7E3"]];
    }
    return _backColorArr;
}

- (NSMutableArray *)titleColorArr {
    if (!_titleColorArr) {
        _titleColorArr = [NSMutableArray arrayWithArray:@[@"B05FFF",@"259ADC",@"FF624B",@"4C7BFF",@"FF9325"]];
    }
    return _titleColorArr;
}
@end
